//
//  HDNFCSettingVC.m
//  HDSmartPenSDKDemo
//
//  Created by 牛的mini on 2016/12/26.
//  Copyright © 2016年 牛的mini. All rights reserved.
//

#import "HDNFCSettingVC.h"

@interface HDNFCSettingVC ()
@property (weak, nonatomic) IBOutlet UISwitch *nfcSwitch; // 默认是关闭的

@end

@implementation HDNFCSettingVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"NFC标签调试";
    [_nfcSwitch setOn:NO];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showNFCID:) name:kBeacon_SMPen_NFC_Info_Notification object:nil];
}

- (void)showNFCID:(NSNotification *)noti
{
    NSString *nfcStr = noti.object;
    [LCCoolHUD showSuccess:[NSString stringWithFormat:@"NFC:%@",nfcStr]
                      zoom:YES
                    shadow:YES];
}

- (IBAction)valueChange:(UISwitch *)sender {
    HDBeaconManager *beaconManager =[HDBeaconManager sharedBeacon];
    [beaconManager nfcChanged:sender.on];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
